
console.log("load demo.js at "+new Date())


var data = { name:"data"}

/********** 13 Symbol **************/
let symbol1=Symbol();
let symbol3=Symbol();
let symbol2=Symbol("s2");
console.log(symbol1,symbol2,symbol3)
const obj = {
  [Symbol.iterator] : function () {
    var i = 0;
    return {
      next: function () {
        return i++<10 ? { value: 1, done: false }:null;
      }
    };
  }
};

function * testG(){
    yield "A";
    yield "B";
    return "C";
}

/********** 15 Proxy & Reflect  **************/
var proxyData = new Proxy(data, {
  get: function (target, propKey, receiver) {
    console.log(`getting ${propKey}!`);
    return Reflect.get(target, propKey, receiver);
  },
  set: function (target, propKey, value, receiver) {
    console.log(`setting ${propKey}!`);
    return Reflect.set(target, propKey, value, receiver);
  }
});


    import Hello from './Hello.vue?t=23223'

    import Hello1 from './Hello.vue?t=2322223'

var o=null;
let iter = obj[Symbol.iterator]();
while(o=iter.next()){
    console.log(o)
}


export {data, proxyData,testG}